package com.bgybmi.util;

import com.alibaba.fastjson.JSON;
import com.jfinal.json.Json;
import com.jfinal.kit.StrKit;
import com.jfinal.qyweixin.sdk.api.AccessTokenApi;
import com.jfinal.qyweixin.sdk.api.ApiConfigKit;
import com.jfinal.qyweixin.sdk.api.ApiResult;
import com.jfinal.qyweixin.sdk.utils.HttpUtils;

import net.sf.json.JSONObject;

/**
 * @author hecore
 * 2017-12-11
 */

//POST
public class UserInfoApi {
	private static String getUserUrl="https://qyapi.weixin.qq.com/cgi-bin/user/getuserdetail?access_token=";
	
	/**
	 * @param user_ticket code获取成员信息之后会拿到user_ticket
	 * @return JsonResult
	 */
	public static String getUserUrl(String user_ticket){
		String reurl = getUserUrl + AccessTokenApi.getAccessTokenStr();		
		String JsonResult=HttpUtils.post(reurl , user_ticket);
		//JSONObject JsonResult = JSONObject.fromObject(str); 
		return JsonResult;
	}
}
